FROM java:8-jdk

MAINTAINER BJB-VR

RUN mkdir -p /config
COPY /remote/config /config
ADD /remote/xr-remote.jar /opt/xr-remote.jar
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone

#RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
#RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
#RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
#RUN apt-get -o Acquire::Check-Valid-Until=false update
#RUN apt-get install sudo

#RUN apt-get update
#RUN apt-get install sudo
#RUN sudo apt-get install gdb
#RUN sudo apt-get install xz-utils

# PORT
EXPOSE 8085
EXPOSE 9088
EXPOSE 8091
#EXPOSE 10086
#
##设置变量 JAVA_OPTS
#ENV JAVA_OPTS="-Xmx1024M -Xms1024M -Xmn256M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M -XX:NativeMemoryTracking=detail \
#-Dcom.sun.management.jmxremote \
#-Dcom.sun.management.jmxremote.rmi.port=10086 \
#-Dcom.sun.management.jmxremote.port=10086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=172.16.20.61"

#设置变量 JAVA_OPTS
ENV JAVA_OPTS="-Xms1024M -Xmx4096M -Xmn256M -XX:MaxMetaspaceSize=192M -XX:MetaspaceSize=192M"
#启动命令
ENTRYPOINT java ${JAVA_OPTS} -jar /opt/xr-remote.jar
